package com.wenhuang.chatgptopen.retu;

import com.wenhuang.chatgptopen.pojo.User;
import jakarta.validation.constraints.NotNull;
import lombok.*;

/*
 *@Time：2023/6/1
 *@Author：Jelly
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@EqualsAndHashCode
public class LoginReturn {
    private Integer id;
    private String email;
    private String password;
    private String avatar;
    private Integer fans;
    private String username;
    private boolean login;
    private String message;
    private boolean followed;

    public void autoInit(User user) {
        id = user.getId();
        email = user.getEmail();
        password = user.getPassword();
        fans = user.getFans();
        avatar = user.getAvatar();
        username = user.getUsername();
    }

}
